# -*- coding: utf-8 -*-
# @Time : 2021/2/19 18:55
# @Author : zhangcheng
# @Software: PyCharm


import os
from configparser import ConfigParser


BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))


CONFIG_DIR = os.path.join(BASE_DIR, 'config')


CONFIG = ConfigParser()
CONFIG.read(os.path.join(CONFIG_DIR, 'config.conf'), encoding="utf8")


class Setting(object):
    # Mysql数据库配置
    HOST = CONFIG['DATABASE']['HOST']
    PORT = CONFIG['DATABASE']['PORT']
    DBNAME = CONFIG['DATABASE']['DBNAME']
    USERNAME = CONFIG['DATABASE']['USERNAME']
    PASSWORD = CONFIG['DATABASE']['PASSWORD']
    # 域名白名单配置
    WHITELIST = CONFIG['DOMAIN']['WHITELIST']


